package fr.cavalier.sort;



import org.junit.Assert;
import org.junit.Test;

import fr.cavalier.utils.ArrayUtils;

public class QuickSortTest {

	@Test
	public void swaptest() {
		int[] array = {1, 3};
		QuickSort.swap(0, 1, array);
		SimplesSort.printArray(array);
		try {
			int posZero = ArrayUtils.getFirstPositionInArray(1, array);
			int posthree = ArrayUtils.getFirstPositionInArray(3, array);
			Assert.assertEquals(1, posZero);
			Assert.assertEquals(0, posthree);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	


}
